const utilSortableChange = (_this, data) => {
  return new Promise((resolve) => {
    if (data.order) {
      if (data.order == "ascending") {
        _this.page.by = "asc"
      } else {
        _this.page.by = "desc"
      }
      _this.page.order = data.prop
    } else {
      _this.page.order = ""
      _this.page.by = ""
    }
    resolve()
  })
}

module.exports = {
  utilSortableChange,
}
